<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="<?=n_css('skin','reset')?>" />
	<link rel="stylesheet" type="text/css" href="<?=n_css('skin','wap')?>" />
</head>
<body style="width:345px;margin:0 auto;">

	<style>
	span{color:green;background-color: #def!important;}
	</style>
	<div class="m-content">
		<div class="m-alert">
			1.选择年、月将再次跳到日历，如果选择日，将跳到对应的查询日期结果页<br />
			2.年份将仅显示3年。<a href="<?=n_url('index','index')?>">返回首页</a><br />
		</div>
		<div class="m-sep-top">
			<?php
			for($i=$data['year']-1;$i<=$data['year']+1;$i++){
				if($i==$data['year']){
			?>
				<span class="m-button" style="width:90px;"><?=$i?>年</span>		
			<?
				}else{
			?>
				<a class="m-button" style="width:90px;" href="<?=n_url('common','calendar',array('calendarDate'=>$i.'-'.$data['month'].'-'.$data['day'],'path'=>$data['path']))?>"<?=$i==$data['year']?' class="m-important2"':''?>><?=$i?>年</a>
			<?php
				}
			}
			?>
		</div>
		<div class="m-sep-top">
			<?php
			for($i=1;$i<=12;$i++){
				if($data['month']==$i){
			?>
				<span class="m-button" style="width:60px;"><?=$i?>月</span>
			<?
				}else{
			?>
				<a style="width:60px;" class="m-button m-sep-top" href="<?=n_url('common','calendar',array('calendarDate'=>$data['year'].'-'.$i.'-'.$data['day'],'path'=>$data['path']))?>"<?=$i==$data['month']?' class="m-important2"':''?>><?=$i?>月</a>
			<?php
				}
			}
			?>
			
		</div>
		<div class="m-sep-top">
			<?php
			$days = date('t',strtotime($data['year'].'-'.$data['month'].'-1'));
			for($i=1;$i<=$days;$i++){
				$day = str_pad($i,2,'0',STR_PAD_LEFT);
				if($i==$data['day']){
			?>
				<span class="m-button m-sep-top"><?=$day?>日</span>
			<?
				}else{
			?>
				<a class="m-button m-sep-top" href="<?=$data['path']?>&cdate=<?=urlencode($data['year'].'-'.$data['month'].'-'.$day)?>"<?=$i==$data['day']?' class="m-important2"':''?>><?=$day?>日</a>
			<?php
				}
			}
			?>
	
		</div>
	</div>
</body>
</html>